package com.tcs.test.executor.exchanger.test;

import java.util.concurrent.Exchanger;

import org.junit.Test;

import com.tcs.test.executor.base.BeseExecutorRun;

public class Run extends BeseExecutorRun {

	@Override
	protected void service() {
		Exchanger<String> exchanger = new Exchanger<>();
        Car car = new Car(exchanger);
        Bike bike = new Bike(exchanger);
        car.start();
        bike.start();
        System.out.println("Main end!");
	}

	@Test
	public void test1() {
		try {
			super.go();
		} catch (InterruptedException e) {
			e.printStackTrace();
		}
	}
}
